package com.drojian.root.database;

import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;

import androidx.annotation.Nullable;

public class SqlUser extends SQLiteOpenHelper {
    private User user;
    private final  String create_table = "create table user (id integer primary key autoincrement, image blob DEFAULT x'00', username text not null, password text not null, description text DEFAULT NULL, sex text DEFAULT NULL, age integer DEFAULT NULL, hobby text DEFAULT NULL, height real DEFAULT NULL, weight real DEFAULT NULL);";


    public SqlUser(@Nullable Context context, @Nullable String name, @Nullable SQLiteDatabase.CursorFactory factory, int version) {
        super(context, name, factory, version);
    }

    @Override
    public void onCreate(SQLiteDatabase db) {
        db.execSQL(create_table);
    }

    @Override
    public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {

    }


}
